<!DOCTYPE html>
<html>
    <head>
        <title>Pivot Demo</title>
        <!-- external libs from cdnjs -->
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

        <!-- PivotTable.js libs from ../dist -->
        <link rel="stylesheet" type="text/css" href="../dist/pivot.css">
        <script type="text/javascript" src="../dist/pivot.js"></script>
        <style>
            body {font-family: Verdana;}
        </style>

        <!-- optional: mobile support with jqueryui-touch-punch -->
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>

        <!-- for examples only! script to show code to user -->
        <script type="text/javascript" src="show_code.js"></script>
    </head>
    <body>
        <script type="text/javascript">
    // This example loads data from the HTML table below.

    $(function(){
        $("#output").pivotUI($("#input"),
        {
            rows: ["color"],
            cols: ["shape"]
        });
     });
        </script>

        <p><a href="index.html">&laquo; back to PivotTable.js examples</a></p>

        <div id="output" style="margin: 30px;"></div>

        <br />
        <h3>Input table:</h3>
        <table id="input" border="1" style="margin: 30px;">
            <thead>
                <tr>
                    <th>color</th>
                    <th>shape</th>
                    <!-- etc... -->
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><span style='color: blue;'>blue</span></td>
                    <td><span style='font-size:20px'>&bigcirc;</span></td>
                </tr>
                <tr>
                    <td><span style='color: red;'>red</span></td>
                    <td><span style='font-size:20px'>&bigtriangleup;</span></td>
                </tr>
                    <!-- etc... -->
            </tbody>
        </table>

    </body>
</html>
